package 设计模式.j_享元模式;

import cn.hutool.log.StaticLog;
import lombok.extern.slf4j.Slf4j;

/**
 * 治愈药水
 *
 * @author caihe
 * @date 2023/3/13 14:08
 */
@Slf4j
public class HealingPotion implements Potion {
    
    private String color;

    public HealingPotion(String color) {
        this.color = color;
    }

    @Override
    public void drink() {
        StaticLog.info("使用了{}治愈药水 {} ", color, System.identityHashCode(this));
    }
}
